package com.neuedu.task;


import java.util.Scanner;

public class Task01 {
    public static void main(String[] args) {
        System.out.println("请输入字符串：");
        Scanner scanner=new Scanner(System.in);
        String i=scanner.next();
        int num=exam(i);
        System.out.println(num);
    }

    private static int exam(String j ){
        int sum=0,num1=0;
        try {
            for ( ;;num1++)
            {
                sum+=(int)(j.charAt(num1));
            }
        } catch (Exception e) {
            return num1;
        }
    }
}